package vip.mengqin.diandezhun.ui.activity;

import android.os.Handler;
import android.view.View;

import com.android.baselibrary.dialog.Comm_DialogFragment;
import com.android.baselibrary.interface_.OkHttpCallBack;
import com.android.baselibrary.responce.BaseResponce;
import com.android.baselibrary.tool.CommLoading;
import com.android.baselibrary.tool.CommToast;
import com.android.baselibrary.util.GlideUtil;
import com.android.baselibrary.view.Comm_HeadView;
import com.android.baselibrary.view.MultiStateView;
import com.android.commcount.ui.activity.Setting_CommCount_ShadeColorActivity;
import com.bumptech.glide.Glide;

import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;
import vip.mengqin.diandezhun.R;
import vip.mengqin.diandezhun.manager.API_Manager;
import vip.mengqin.diandezhun.manager.UserManager;
import vip.mengqin.diandezhun.responce.RechargeData;

/**
 * 设置
 */
public class SettingActivity extends BaseActivity {

    @BindView(R.id.multiplestatusView)
    MultiStateView multiplestatusView;
    @BindView(R.id.comm_title)
    Comm_HeadView comm_title;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_setting;
    }

    @Override
    protected void initView() {
        comm_title.setTitle("设置");


    }

    @Override
    protected void initData() {

    }

    Handler handler = new Handler();

    @OnClick({R.id.ctv_qingchuhuancun, R.id.ctv_cunchiweizhi, R.id.ctv_zhezhaotoumingdu })
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.ctv_qingchuhuancun:   //清除缓存
                new Thread(new Runnable() {
                    @Override
                    public void run() {
                        try {
                            Glide.get(mContext).clearDiskCache();
                            handler.post(new Runnable() {
                                @Override
                                public void run() {
                                    CommToast.showToast(mContext, "已清除");
                                }
                            });
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                    }
                }).start();
                break;
            case R.id.ctv_cunchiweizhi:   //照片存储位置


                break;
            case R.id.ctv_zhezhaotoumingdu:   //遮罩透明度
                StartActivity(Setting_CommCount_ShadeColorActivity.class);
                break;

        }
    }

}
